{% extends "miramar/base.html" %}
{% load i18n %}
{% load miramar_tags %}

{% block title %}{% trans "Approve for publishing" %}{% endblock %}
{% block extrahead %}
{{ form.media }}
<script type="text/javascript" src="{{ MEDIA_URL }}{{ jquery_urlstub }}"></script>
<script type="text/javascript">
$(document).ready(function() {
  $("#header").hide();
  $(".breadcrumbs").hide();
});
</script>
{% endblock %}
{% block content_title %}<h1>{% trans "Approve for publishing" %}</h1>{% endblock %}

{% block content %}
<table class="module">
    <caption>{% trans "Add page" %}</caption>
    <tr>
        <th>{% trans "URL stub" %}</th>
        <td><input id="id_urlstub" type="text" name="urlstub" /></td>
    </tr>
</table>
<p><input id="id_submit" type="button" value="{% trans "Create" %}" /><input id="id_cancel" type="button" value="{% trans "Cancel" %}" /></p>
<script type="text/javascript">
  $("#id_cancel").click(function() { window.parent.$.modal.close(); });
  $("#id_submit").click(function() {
	  new_url = '{% url miramar_page_create '__placeholder__' %}';
	  new_url = new_url.replace('__placeholder__', $('#id_urlstub').val());
	  window.parent.location = new_url;
  });
</script>
{% endblock %}
